<table>
    {foreach $data.changes as $change name="changes"}
        <tr>
            <td style="width: 200px;">
                {if $smarty.foreach.changes.first}
                    {if $data.type == $smarty.const.CHANGES_TYPE_TASK}
                        <a href="{$data.root}?input=edit_task&task={$change.rel_id}">{$data.name}</a>
                    {elseif $data.type == $smarty.const.CHANGES_TYPE_TSDR}
                        <a href="{$data.root}?input=tsdr_more&tsdr_id={$change.rel_id}">{$data.name}</a>
                    {/if}
                {/if}
            </td>
            <td style="width: 120px">
                {if $smarty.foreach.changes.first}
                    {$data.client_data.name}
                {/if}
            </td>
            <td style="width: 80px;">
                {if $change.status == $smarty.const.CHANGES_STATUS_NEW}
                    New
                {elseif $change.status == $smarty.const.CHANGES_STATUS_UPDATED}
                    Update
                {/if}
            </td>
            <td style="width: 500px;">
                {if $change.status == $smarty.const.CHANGES_STATUS_UPDATED}
                    <i>{$change.attribute}</i>: {$change.old} - <b>{$change.new}</b>
                {/if}
            </td>
            <td style="width: 150px;">
                {$change.date|date_format:"%H:%M:%S"}
            </td>
            <td style="width: 120px;">
                {$change.user_data.name} {$change.user_data.surname}
            </td>
        </tr>
    {/foreach}
</table>